<template>
	<jn-childe @adds='onAdd' @change="onchag"></jn-childe>
	---
	<view class="">
		<text>父组件内容</text>
		<view class="box" :style="{background:color,fontSize:size+'px'}">num:{{num}}</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
const num = ref(0)
const color = ref('#ccc')
const size = ref()
const onAdd = function(e){
	console.log(e);
	console.log(String(e).substring(3,6));
	num.value = e;
	color.value = '#'+String(e).substring(3,6)
}
const onchag = function(e){
	console.log(e)
	size.value = e
}
</script>

<style lang="scss" scoped>
.box{
	width: 100%;
	height: 200px;
}
</style>
